.class Lcom/waiqin365/lightapp/store/i;
.super Landroid/os/Handler;


# instance fields
.field private a:Ljava/lang/ref/WeakReference;


# direct methods
.method public constructor <init>(Lcom/waiqin365/lightapp/store/StoreCartActivity;)V
    .locals 1

    invoke-direct {p0}, Landroid/os/Handler;-><init>()V

    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/store/i;->a:Ljava/lang/ref/WeakReference;

    return-void
.end method


# virtual methods
.method public handleMessage(Landroid/os/Message;)V
    .locals 7

    const/4 v6, 0x0

    const/4 v5, 0x1

    const/4 v4, 0x0

    iget-object v0, p0, Lcom/waiqin365/lightapp/store/i;->a:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/store/StoreCartActivity;

    if-nez v0, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    invoke-virtual {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->dismissProgressDialog()V

    iget v1, p1, Landroid/os/Message;->what:I

    sparse-switch v1, :sswitch_data_0

    goto :goto_0

    :sswitch_0
    iget-object v1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v1, Lcom/waiqin365/lightapp/store/b/a/h;

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/store/b/a/h;->b()Z

    move-result v2

    if-eqz v2, :cond_8

    iget-object v2, v1, Lcom/waiqin365/lightapp/store/b/a/h;->b:Ljava/lang/String;

    if-eqz v2, :cond_7

    const-string/jumbo v2, "1"

    iget-object v3, v1, Lcom/waiqin365/lightapp/store/b/a/h;->b:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_7

    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->f(Lcom/waiqin365/lightapp/store/StoreCartActivity;)Lcom/waiqin365/lightapp/view/ImagePreview_Vertical;

    move-result-object v2

    if-eqz v2, :cond_2

    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->f(Lcom/waiqin365/lightapp/store/StoreCartActivity;)Lcom/waiqin365/lightapp/view/ImagePreview_Vertical;

    move-result-object v2

    invoke-virtual {v2}, Lcom/waiqin365/lightapp/view/ImagePreview_Vertical;->y()I

    move-result v2

    if-lez v2, :cond_2

    new-instance v2, Lcom/waiqin365/lightapp/kehu/b/o;

    invoke-direct {v2}, Lcom/waiqin365/lightapp/kehu/b/o;-><init>()V

    iget-object v3, v1, Lcom/waiqin365/lightapp/store/b/a/h;->e:Ljava/lang/String;

    iput-object v3, v2, Lcom/waiqin365/lightapp/kehu/b/o;->a:Ljava/lang/String;

    invoke-static {}, Lcom/waiqin365/base/login/mainview/a;->a()Lcom/waiqin365/base/login/mainview/a;

    move-result-object v3

    invoke-virtual {v3, v0}, Lcom/waiqin365/base/login/mainview/a;->k(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v3

    iput-object v3, v2, Lcom/waiqin365/lightapp/kehu/b/o;->b:Ljava/lang/String;

    iget-object v1, v1, Lcom/waiqin365/lightapp/store/b/a/h;->f:Ljava/lang/String;

    iput-object v1, v2, Lcom/waiqin365/lightapp/kehu/b/o;->d:Ljava/lang/String;

    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->f(Lcom/waiqin365/lightapp/store/StoreCartActivity;)Lcom/waiqin365/lightapp/view/ImagePreview_Vertical;

    move-result-object v1

    invoke-virtual {v1, v2}, Lcom/waiqin365/lightapp/view/ImagePreview_Vertical;->a(Lcom/waiqin365/lightapp/kehu/b/o;)V

    new-instance v1, Landroid/content/Intent;

    const-string/jumbo v2, "android.intent.action.RUN"

    invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-class v2, Lcom/fiberhome/upload/UpLoadService;

    invoke-virtual {v1, v0, v2}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    :cond_2
    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->x(Lcom/waiqin365/lightapp/store/StoreCartActivity;)Z

    move-result v1

    if-eqz v1, :cond_6

    new-instance v1, Ljava/util/HashMap;

    invoke-direct {v1}, Ljava/util/HashMap;-><init>()V

    const-string/jumbo v2, "type"

    sget-object v3, Lcom/fiberhome/gaea/client/a/e;->d:Lcom/fiberhome/gaea/client/a/e;

    invoke-virtual {v1, v2, v3}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    const-class v3, Lcom/waiqin365/lightapp/chexiao/ChexiaoSalesProcessSelectActivity;

    invoke-interface {v2, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    const-class v3, Lcom/waiqin365/lightapp/visit/SeniorVisitProcessSelectActivity;

    invoke-interface {v2, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    invoke-static {}, Lcom/fiberhome/gaea/client/a/b;->a()Lcom/fiberhome/gaea/client/a/b;

    move-result-object v3

    const-string/jumbo v4, "reinit_activity"

    invoke-virtual {v3, v4, v1, v2}, Lcom/fiberhome/gaea/client/a/b;->a(Ljava/lang/String;Ljava/lang/Object;Ljava/util/List;)V

    invoke-static {v0}, Lcom/waiqin365/base/db/jxccache/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/jxccache/f;

    move-result-object v1

    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->b(Lcom/waiqin365/lightapp/store/StoreCartActivity;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/waiqin365/base/db/jxccache/f;->h(Ljava/lang/String;)Z

    invoke-static {v0}, Lcom/waiqin365/base/db/jxccache/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/jxccache/f;

    move-result-object v1

    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->b(Lcom/waiqin365/lightapp/store/StoreCartActivity;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/waiqin365/base/db/jxccache/f;->f(Ljava/lang/String;)Z

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->finish()V

    const v1, 0x7f040020

    const v2, 0x7f040023

    invoke-virtual {v0, v1, v2}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->overridePendingTransition(II)V

    :goto_1
    invoke-static {}, Ljava/util/UUID;->randomUUID()Ljava/util/UUID;

    move-result-object v1

    invoke-virtual {v1}, Ljava/util/UUID;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->b(Lcom/waiqin365/lightapp/store/StoreCartActivity;Ljava/lang/String;)Ljava/lang/String;

    const v1, 0x7f08079c

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->showToast(Ljava/lang/String;)V

    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->k(Lcom/waiqin365/lightapp/store/StoreCartActivity;)Lcom/waiqin365/lightapp/view/CustomerSelectView_Vertical;

    move-result-object v1

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/view/CustomerSelectView_Vertical;->f()V

    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->f(Lcom/waiqin365/lightapp/store/StoreCartActivity;)Lcom/waiqin365/lightapp/view/ImagePreview_Vertical;

    move-result-object v1

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/view/ImagePreview_Vertical;->i()V

    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->r(Lcom/waiqin365/lightapp/store/StoreCartActivity;)Landroid/widget/EditText;

    move-result-object v1

    const-string/jumbo v2, ""

    invoke-virtual {v1, v2}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->j(Lcom/waiqin365/lightapp/store/StoreCartActivity;)Landroid/view/View;

    move-result-object v0

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    goto/16 :goto_0

    :sswitch_1
    iget-object v1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v1, Lcom/waiqin365/lightapp/store/b/a/e;

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/store/b/a/e;->b()Z

    move-result v2

    if-eqz v2, :cond_4

    const-string/jumbo v2, "1"

    iget-object v3, v1, Lcom/waiqin365/lightapp/store/b/a/e;->b:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_4

    iget-object v2, v1, Lcom/waiqin365/lightapp/store/b/a/e;->d:Lcom/waiqin365/lightapp/store/c/a;

    if-eqz v2, :cond_0

    iget-object v2, v1, Lcom/waiqin365/lightapp/store/b/a/e;->d:Lcom/waiqin365/lightapp/store/c/a;

    iget-object v2, v2, Lcom/waiqin365/lightapp/store/c/a;->r:Ljava/util/List;

    if-eqz v2, :cond_0

    iget-object v2, v1, Lcom/waiqin365/lightapp/store/b/a/e;->d:Lcom/waiqin365/lightapp/store/c/a;

    iget-object v2, v2, Lcom/waiqin365/lightapp/store/c/a;->r:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-lez v2, :cond_0

    invoke-static {v0}, Lcom/waiqin365/base/db/jxccache/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/jxccache/f;

    move-result-object v2

    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->b(Lcom/waiqin365/lightapp/store/StoreCartActivity;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/waiqin365/base/db/jxccache/f;->f(Ljava/lang/String;)Z

    iget-object v1, v1, Lcom/waiqin365/lightapp/store/b/a/e;->d:Lcom/waiqin365/lightapp/store/c/a;

    iget-object v1, v1, Lcom/waiqin365/lightapp/store/c/a;->r:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_2
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_3

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/waiqin365/lightapp/product/d/d;

    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->b(Lcom/waiqin365/lightapp/store/StoreCartActivity;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v3}, Lcom/waiqin365/lightapp/product/d/d;->k(Ljava/lang/String;)V

    invoke-static {v0}, Lcom/waiqin365/base/db/jxccache/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/jxccache/f;

    move-result-object v3

    invoke-virtual {v3, v1}, Lcom/waiqin365/base/db/jxccache/f;->a(Lcom/waiqin365/base/db/jxccache/g;)J

    goto :goto_2

    :cond_3
    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->a(Lcom/waiqin365/lightapp/store/StoreCartActivity;)V

    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->w(Lcom/waiqin365/lightapp/store/StoreCartActivity;)V

    goto/16 :goto_0

    :cond_4
    iget-object v1, v1, Lcom/waiqin365/lightapp/store/b/a/e;->c:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_5

    const v1, 0x7f0806ab

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    :cond_5
    invoke-static {v0, v1, v4}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    goto/16 :goto_0

    :cond_6
    invoke-static {v0}, Lcom/waiqin365/base/db/jxccache/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/jxccache/f;

    move-result-object v1

    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->b(Lcom/waiqin365/lightapp/store/StoreCartActivity;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/waiqin365/base/db/jxccache/f;->h(Ljava/lang/String;)Z

    invoke-static {v0}, Lcom/waiqin365/base/db/jxccache/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/jxccache/f;

    move-result-object v1

    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->b(Lcom/waiqin365/lightapp/store/StoreCartActivity;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/waiqin365/base/db/jxccache/f;->f(Ljava/lang/String;)Z

    invoke-static {}, Lcom/fiberhome/gaea/client/a/b;->a()Lcom/fiberhome/gaea/client/a/b;

    move-result-object v1

    const-string/jumbo v2, "close_activity"

    const-class v3, Lcom/waiqin365/lightapp/store/StoreListActivity;

    invoke-virtual {v1, v2, v6, v3}, Lcom/fiberhome/gaea/client/a/b;->a(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Class;)V

    new-instance v1, Landroid/content/Intent;

    const-class v2, Lcom/waiqin365/lightapp/store/StoreListActivity;

    invoke-direct {v1, v0, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->startActivity(Landroid/content/Intent;)V

    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->k(Lcom/waiqin365/lightapp/store/StoreCartActivity;)Lcom/waiqin365/lightapp/view/CustomerSelectView_Vertical;

    move-result-object v1

    invoke-virtual {v1, v6}, Lcom/waiqin365/lightapp/view/CustomerSelectView_Vertical;->setCmCustomerInfo(Lcom/waiqin365/lightapp/kehu/b/am;)V

    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->w(Lcom/waiqin365/lightapp/store/StoreCartActivity;)V

    invoke-static {}, Ljava/util/UUID;->randomUUID()Ljava/util/UUID;

    move-result-object v1

    invoke-virtual {v1}, Ljava/util/UUID;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->b(Lcom/waiqin365/lightapp/store/StoreCartActivity;Ljava/lang/String;)Ljava/lang/String;

    goto/16 :goto_1

    :cond_7
    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->u(Lcom/waiqin365/lightapp/store/StoreCartActivity;)Landroid/widget/Button;

    move-result-object v2

    invoke-virtual {v2, v5}, Landroid/widget/Button;->setEnabled(Z)V

    iget-object v1, v1, Lcom/waiqin365/lightapp/store/b/a/h;->c:Ljava/lang/String;

    invoke-static {v0, v1, v4}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    goto/16 :goto_0

    :cond_8
    invoke-static {v0}, Lcom/waiqin365/lightapp/store/StoreCartActivity;->u(Lcom/waiqin365/lightapp/store/StoreCartActivity;)Landroid/widget/Button;

    move-result-object v2

    invoke-virtual {v2, v5}, Landroid/widget/Button;->setEnabled(Z)V

    iget v1, v1, Lcom/waiqin365/lightapp/store/b/a/h;->a:I

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;I)V

    goto/16 :goto_0

    :sswitch_data_0
    .sparse-switch
        0x3f0 -> :sswitch_0
        0x3ff -> :sswitch_1
    .end sparse-switch
.end method
